#ifndef MQTT_NET_COMMUNICATION_HEAD_H
#define MQTT_NET_COMMUNICATION_HEAD_H

#include <vector>
#include <istream>
#include "net-communication.h"
#include <sys/types.h> /* See NOTES */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include "MQTTClient.h"

using namespace std;

class MQTTNetCommunication : public NetCommunication, public MQTTClient
{
public:
	MQTTNetCommunication(const string &host = "127.0.0.0", uint16_t port = 1883);
	bool sendPacket(const vector<uint8_t> &packet);
	bool recvPacket(vector<uint8_t> &packet, int timeout = -1);
	~MQTTNetCommunication(); 
};

#endif